home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / tmidi_17.zip / tmidi.doc < prev    next >
Text File  |  1997-03-30  |  10KB  |  252 lines

  1.  tmidi.doc                                   Copyright (C)1997 Cornel Huth
  2.  Release 1.7                                                   30-Mar-1997
  3.  
  4.  
  5. tmidi is a real-time, VIO-based standard MIDI file player.  Files
  6. included are:
  7.  
  8.         1. paradise.sys
  9.         2. tmidi.exe
  10.         3. several SMFs, documentation
  11.  
  12. Optionally, if you are running Warp 3 or earlier:
  13.  
  14.         4. clock01.sys  (clock02.sys available by request, for MCA)
  15.  
  16.  
  17. No other drivers are needed.  MMPM/2 is not required (but is okay), nor
  18. are any soundcard drivers.  This package includes everything you need for
  19. perfect MIDI playback, even under heavy multitasking.  tmidi transmits
  20. all MIDI data to the device, including sysex messages.  You can now
  21. specify the playback mode (GM, GS, or XG) if not already in the SMF.
  22.  
  23.  ============
  24.   NEW in 1.5  Sound Blaster Driver Fixed
  25.  ============
  26.  
  27. Version 1.5 introduces fixes that allow it to work in spite of the
  28. (an unnamed) driver that resets the MPU interface every chance it gets,
  29. such as when you start/end a wave play and do not already have MIDI going.
  30. Oh, by the way, this fix in tmidi only relates to those of you using
  31. cards that use SB16D2.SYS (and perhaps the AWE version).  In the end,
  32. tmidi plays on, albeit with a burp or two when you play a wave.  I was
  33. made aware of this only today.  I think their driver does this in an
  34. attempt to deal with "hanging notes" that SBs are said to cause.  I've
  35. never had a problem with hanging notes, so I consider this tactic of
  36. doing an MPU reset at -WAVE- play start/end tantamount to shooting one's
  37. foot.
  38.  
  39. Also recently available is tmixer 1.3, in a separate package called
  40. tmixer*.zip.  VIO, works in 2.1, Warp 3 and 4.
  41.  
  42. Also recently available is aMixer 1.3, in a separate package called
  43. amixer*.zip (includes SyncLock).  PM, works in Warp 3 and Warp 4.
  44.  
  45.  
  46. Installation
  47. ------------
  48.  
  49. Install the (two) SYS driver(s) in your boot drive's root directory and
  50. include a reference for the paradise driver in your config.sys:
  51.  
  52.         DEVICE=G:\PARADISE.SYS     (optional -q for quiet install)
  53.  
  54. Pardise driver 1.52 or later is required.
  55.  
  56. CLOCK01.SYS, installed automatically by the boot process and so has no
  57. reference in the config.sys file, is based on the Warp 4.0 driver.  It
  58. can be used in previous OS/2 versions, too.  If you are using Warp 4.0,
  59. your CLOCK driver already has the IDC hook, so you can use the one you
  60. already have.  The included CLOCK01.SYS driver is only for those running
  61. Warp 3 or earlier.
  62.  
  63. If you have the old clock driver installed, paradise.sys will gracefully
  64. tell you so, and not install itself.  If you get this message at boot, use
  65. the included clock01.sys.
  66.  
  67. Note:  Due to a long-standing bug in OS/2, detection of obsolete clock
  68. drivers is not as straight-forward as it should be.  However, if the
  69. obsolete clock is not found during boot, it likely will be found by tmidi.
  70. If it still gets by you will likely crash your machine.  Keep a boot floppy
  71. available and simply replace your obsolete clock01.sys driver with the
  72. one included in this package.
  73.  
  74. The clock01.sys driver in Warp 3's fixpack #26 is -not- an up-to-date
  75. driver.  If the clock01.sys driver is substantially less than 4000 bytes
  76. (e.g., 3520 bytes, like the fp26 one (date 10-10-96)) you need to install
  77. the clock01.sys driver included in this package.
  78.  
  79. Once you have the driver(s) installed, reboot.
  80.  
  81. Using tmidi
  82. -----------
  83.  
  84.         [G:\]tmidi [-p1:330] file.mid [<-gm,-gs-xg>] [-w1:n] [-t:x]
  85.  
  86. For example:
  87.  
  88.         [G:\]tmidi -p1:330 cometomy.mid
  89.  
  90. The default MPU port is 330h, and if there, does not need to be specified.
  91. The Paradise driver handles up to 126 ports, but tmidi, being what it is,
  92. directs everything out port 1 (where a port here is a particular device).
  93.  
  94. So, just:
  95.  
  96.         [G:\]tmidi alliwann.mid
  97.  
  98. Once you hit enter, the SMF is loaded and play starts.  Any key press (just
  99. about) exits tmidi and stops all sounds.  In case of emergency, an exit list
  100. handler is installed to ensure everything gets shut down.
  101.  
  102.  [I:\tmidi\mids]tmidi reaperxg.mid -xg
  103.  mpu: 330, type: 1, tracks: 20, div: 120, mode: XG
  104.  -008222116
  105.  
  106. The above is an example of an SMF without an embedded mode, so -xg is needed
  107. to make it sound its best.  Not all MPU devices have XG mode, or GS, but
  108. most are GM-capable.
  109.  
  110. If an error in the SMF is detected, the track and tick count where the
  111. problem occured is shown.
  112.  
  113.  
  114. Specifying Mode
  115. ---------------
  116.  
  117. An optional switch is the MIDI playback mode:  GM, GS, or XG.  If the
  118. SMF contains embedded mode, you can specifiy it via the command line.
  119. If the SMF already contains a mode, you cannot override it.  If the
  120. SMF contains no specific mode, and you do not specifiy one on the
  121. command line, the playback is in whatever mode the MPU is already in.
  122. There is no reset at the end of play; tmidi leaves the MPU in whatever
  123. mode was last used.
  124.  
  125. For example:
  126.  
  127.         [G:\]tmidi file.mid -gm
  128.  
  129. If file.mid has no embedded mode, GM mode will be used.  If file.mid
  130. does contain a mode, the mode in the file is always used.
  131.  
  132.  
  133. Specifying Waits
  134. ----------------
  135.  
  136. To detect when the MPU interface has been reset out from under it, the
  137. Paradise driver checks for a timeout condition to occur.  By default, it
  138. counts down 10,000 times before concluding that something's gone wrong.
  139.  
  140. For very fast systems this may be too soon.  If you get a time-out error
  141. reported, or otherwise do not hear anything when you expect you should,
  142. use the -w1: switch to set this wait timeout value.  The valid range is
  143. 1000 to 65535, with the default set to 10,000.
  144.  
  145. An additional fail-safe has been added to this time-out check:  when a
  146. time-out condition has occured 3 times in a row the current play is
  147. stopped and tmidi exits.  The next play should go as expected.
  148.  
  149.  
  150. Specifying Tracks
  151. -----------------
  152.  
  153. tmidi always plays the first track, track 1, regardless of what -t: is.
  154.  
  155. By default, tmidi plays all tracks in the SMF, up to 1000 or more tracks
  156. (limited only by available memory).  To selectively play any or all of the
  157. first 32 tracks add the -t: switch, followed by the hex representation of
  158. the tracks to mask.  For example, to play only track 5, use:
  159.  
  160.         -t:10  (this is a base-16 number:  10hex = 16decimal)
  161.  
  162. To use this feature in tmidi means that you need to learn a little bit
  163. about base-16 numbers.  Simply put, each digit in hex holds up to 16,
  164. rather than 10 in decimal.  Hex digits include 0,1,2...9,A,B,C,D,E,F
  165. (the letters are used to represent 10 through 15).  When you carry out
  166. of a digit (in decimal it's like adding 1 to 9, getting 10), you do like
  167. base-10 in that you store a 0 and carry a 1.  In this case, though, the
  168. 10 hex is 16 (F hex=15 decimal, so F+1=10 hex, or 16 decimal).  There
  169. are bound to be several FAQs on hex and binary counting on the net.
  170.  
  171. You can play more than just one selective track:  for example, to play
  172. tracks 1, 2, and 10, use this simple addition method:
  173.  
  174.   mask = 0
  175.   then, for each track:
  176.      mask = mask + (2 ^ (track-1))   where ^ is "to the power of"
  177.  
  178. So, for tracks 1,2,10:
  179.  
  180. tk#                       (mask = 0, to start with)
  181.   1 mask = 0 + 2 ^ (1-1)  (mask = 1, since any number to the 0th is 1)
  182.   2 mask = 1 + 2 ^ (2-1)  (mask = 1 + (2^1), or 1+2=3)
  183.  10 mask = 3 + 2 ^ (10-1) (mask = 3 + (2^9), or 3+512=515
  184.  
  185. Now, covert 515 to hex:  203.  Use -t:203 to play tracks 1, 2, and 10.  Do
  186. not leave a space between the : and the first digit.  Of course, if you
  187. have a multi-base calculator, that helps, too.  You could also do it in
  188. binary, and convert that to hex (that's easier than base-10 to 0-16).
  189.  
  190. You may say why covert -- why not just use the base-10 version?  Because
  191. you always have to do the math; with hex you can easily do this in your
  192. head.  Why not offer both?  Why not indeed.  Why not metric and SAE?  They
  193. used to do that, then they dumped metric altogether.  Good enough reason?
  194.  
  195. You can also experiment.  A list of tracks that are played is shown whenever
  196. -t: is used.  For example:
  197.  
  198.  [F:\mids\elp]tmidi ke91.mid -t:f
  199.  mpu:330  type:1  trks:29  div:480  mode:GS  tmask:F
  200.                   trks:12345678901234567890123456789
  201.  -086454041            IIII
  202.  
  203. Tracks 1,2,3,4 are played with -t:F, out of the 29 tracks in this SMF.  Note
  204. that tracks do not have any correlation to MIDI channels.  For example, MIDI
  205. -channel- 10 is the 'drum channel'.  -Track- 10 can be Bass, Guitar, or yes,
  206. even drums.  The main idea in selective track playing is to isolate a single
  207. track, or group of tracks, to better hear them.
  208.  
  209.  
  210. Limitations
  211. -----------
  212.  
  213. A compatible MPU-401 device is required.  This includes not only
  214. real MPU-401 devices, but cards like the Sound Blaster 16, AWE32, etc.,
  215. with either a daughterboard (CL Wave Blaster, Yamaha DB50XG, etc.), or
  216. a sound module or keyboard attached to the external MIDI port.  Stand-
  217. alone cards, like the Yamaha SW60XG, can be used, too.  There are no
  218. plans to work with other, non-MPU devices at this time.
  219.  
  220.  
  221. Tips
  222. ----
  223. If the SMF has no internal play mode specified (GM, GS, or XG), tmidi
  224. plays it using whatever the MPU device was last set to.  To prevent
  225. playing a "generic" (a file with no internal play mode) in whatever
  226. mode was last set, add -gm to each command line until you are sure
  227. that the "generic" SMF is really a GS or XG.  If there is an internal
  228. play mode, adding -gm won't have any affect.
  229.  
  230. Since this is just a test bed for the Paradise MIDI driver you don't
  231. have a slick UI.  To play a whole lot of files without having to keep
  232. feeding the command line, create a cmd file like this:
  233.  
  234.         dir *.mid /b > all.cmd
  235.  
  236. Edit all.cmd by placing a ` in column 1 for all rows.  Go back and
  237. replace the ` with a tmidi<space> (or tmidi<space><quote>).  If you
  238. are using quotes around the name (spaces in the names), change .mid to
  239. .mid<quote>.  Then, just type in all.cmd.  If you don't like a
  240. tune, just hit a key (ctrl-C to exit for good).  Stayed tuned for the
  241. first part of the Paradise System, probably available in a month or so.
  242.  
  243. If -t: is used, only the first 32 tracks can be played (-t:FFFFFFFF).
  244. Tracks 33 and later will be skipped in this case, along with any tracks
  245. you have masked out.
  246.  
  247. See the README for more.
  248.  
  249.  
  250. Filename is tmidi_17.zip.  At ftp://hobbes.nmsu.edu/os2/... or the
  251. sites listed below for the always-current version.
  252.